package com.xin.di.uav.applet.controller;

import com.xin.di.uav.applet.service.PermissionService;
import com.xin.di.uav.common.response.TreeResp;
import com.xin.di.uav.common.utils.Rs;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
@RequestMapping("/home/permission/")
public class SysPermissionController {

    @Autowired
    private PermissionService permissionService;

    @GetMapping("list")
    public Rs<List<TreeResp>> list(
    ) {
        return Rs.success(permissionService.list());
    }

}
